package app.vendorportal.api.data;

import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import java.util.Date;
import java.util.List;

/**
 * @author Raymond
 */

@XmlRootElement(name = "vendor-pick-ticket")
@XmlAccessorType(XmlAccessType.FIELD)
public class EDI856VendorPickTicket {

    public static enum Status {
        ACCEPT, REJECT, UNSHIPPED
    }

    @NotNull(message = "order id is required")
    @XmlElement(name = "order-id")
    private String orderId;

    @NotNull(message = "original pick ticket is required")
    @XmlElement(name = "original-pickticket-number")
    private String originalPickTicketNumber;

    @NotNull(message = "order id is required")
    @XmlElement(name = "new-pickticket-number")
    private String newPickTicketNumber;

    @NotNull(message = "tracking number is required")
    @XmlElement(name = "tracking-number")
    private String trackingNumber;

    @XmlElement(name = "ship-from-warehouse-code")
    private String shipFromWarehouseCode;

    @XmlElement(name = "shipping-date")
    private Date shippingDate;

    @XmlElement(name = "shipping-method")
    private String shippingMethod;

    @NotNull(message = "status is required")
    @XmlElement(name = "status")
    private Status status;

    @NotNull(message = "vendor pick ticket items is required")
    @XmlElementWrapper(name = "vendor-pickticket-items")
    @XmlElement(name = "vendor-pickticket-item")
    private List<EDI856VendorPickTicketItem> vendorPickTicketItems;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOriginalPickTicketNumber() {
        return originalPickTicketNumber;
    }

    public void setOriginalPickTicketNumber(String originalPickTicketNumber) {
        this.originalPickTicketNumber = originalPickTicketNumber;
    }

    public String getNewPickTicketNumber() {
        return newPickTicketNumber;
    }

    public void setNewPickTicketNumber(String newPickTicketNumber) {
        this.newPickTicketNumber = newPickTicketNumber;
    }

    public String getTrackingNumber() {
        return trackingNumber;
    }

    public void setTrackingNumber(String trackingNumber) {
        this.trackingNumber = trackingNumber;
    }

    public String getShipFromWarehouseCode() {
        return shipFromWarehouseCode;
    }

    public void setShipFromWarehouseCode(String shipFromWarehouseCode) {
        this.shipFromWarehouseCode = shipFromWarehouseCode;
    }

    public Date getShippingDate() {
        return shippingDate;
    }

    public void setShippingDate(Date shippingDate) {
        this.shippingDate = shippingDate;
    }

    public String getShippingMethod() {
        return shippingMethod;
    }

    public void setShippingMethod(String shippingMethod) {
        this.shippingMethod = shippingMethod;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public List<EDI856VendorPickTicketItem> getVendorPickTicketItems() {
        return vendorPickTicketItems;
    }

    public void setVendorPickTicketItems(List<EDI856VendorPickTicketItem> vendorPickTicketItems) {
        this.vendorPickTicketItems = vendorPickTicketItems;
    }
}
